/*
 * LINQ to LDAP
 * http://linqtoldap.codeplex.com/
 * 
 * Copyright Alan Hatter (C) 2010-2012
 * alan.hatter@gmail.com - http://hattercoding.blogspot.com/
 * 
 * This project is subject to licensing restrictions. Visit http://linqtoldap.codeplex.com/license for more information.
 */

using System.Reflection;

namespace LinqToLdap.Mapping
{
    /// <summary>
    /// Interface for class that can build <see cref="IPropertyMapping"/>
    /// </summary>
    public interface IPropertyMappingBuilder
    {
        /// <summary>
        /// Name of the property
        /// </summary>
        string PropertyName { get; }

        /// <summary>
        /// Indicates if the builder is for a distinguished name property.
        /// </summary>
        bool IsDistinguishedName { get; }

        /// <summary>
        /// Indicates if the property is read only
        /// </summary>
        bool IsReadOnly { get;  }

        /// <summary>
        /// Indicates if the property is generated by the store.
        /// </summary>
        bool IsStoreGenerated { get; }

        /// <summary>
        /// The name of the attribute in the directory.
        /// </summary>
        string AttributeName { get; }

        /// <summary>
        /// The <see cref="PropertyInfo"/>.
        /// </summary>
        PropertyInfo PropertyInfo { get; }

        /// <summary>
        /// Create the property mapping
        /// </summary>
        /// <returns></returns>
        IPropertyMapping ToPropertyMapping();
    }
}
